/* 移动端优先样式：竖屏单列布局，工具、画布、属性面板垂直排列，按钮采用触控友好尺寸 */
.creat-page {
  display: block;
  padding: 12px;
  padding-top: 72px;
  /* 为固定工具栏留出顶部空间 */
  background: linear-gradient(180deg, #fff 0%, #f7f7f7 100%);
  /* 触控友好按钮 */
  .taro-button,
  button {
    min-width: 68px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
  }

  /* 使画布在页面内水平居中并自适应 */
  .creat-page__canvas {
    margin-left: auto;
    margin-right: auto;
    max-width: 740px;
  }

  /* 画布 */
  &__canvas {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    touch-action: none;
    /* 优化触摸响应 */
  }

  /* 画布内的元素 */
  .canvas-el {
    position: absolute;
    border-radius: 6px;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
  }

  .canvas-el.is-active {
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.12);
  }

  /* 更明显的图片选中边框 */
  .canvas-el.is-active.is-image {
    box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.18), 0 6px 18px rgba(255,140,66,0.08);
    border: 2px solid rgba(255,140,66,0.9);
    border-radius: 8px;
  }

  /* 裁剪时显示简单的八个控制点（视觉提示，功能由 modal 控制） */
  .canvas-el.is-cropping {
    outline: 2px dashed rgba(66,133,244,0.9);
  }

  /* 属性面板 / 列表 */
  &__right {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    margin-top: 12px;
  }

  .panel-title {
    font-weight: 700;
    margin-bottom: 8px
  }

  /* 导出按钮 */
  .export-btn {
    width: 100%;
    margin-top: 12px;
    background: #FF8C42;
    color: #fff;
    text-align: center;
    padding: 12px 8px;
    border-radius: 10px;
    font-weight: 600;
  }
}

/* 简易裁剪模态框样式 */
.crop-modal {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 120;
}
.crop-modal-inner {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  width: 92%;
  max-width: 520px;
}

/* 移除：不再使用数值输入弹窗 */
.crop-modal { display: none }

/* 裁剪叠加层 */
.crop-overlay {
  border: 2px dashed rgba(66,133,244,0.95);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.02);
  pointer-events: none;
}
.crop-overlay .crop-handle {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid rgba(66,133,244,0.95);
  border-radius: 2px;
  position: absolute;
}
.crop-overlay .crop-handle-tl { left: -8px; top: -8px }
.crop-overlay .crop-handle-tr { right: -8px; top: -8px }
.crop-overlay .crop-handle-bl { left: -8px; bottom: -8px }
.crop-overlay .crop-handle-br { right: -8px; bottom: -8px }

/* 可拖动区域覆盖（用于接收 touch 作为移动） */
.crop-overlay {
  pointer-events: auto;
}
.crop-overlay .crop-drag {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0);
}

.crop-actions .crop-cancel,
.crop-actions .crop-apply {
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
}
.crop-actions .crop-apply {
  background: #FF8C42;
}